#include "Platform_Types.h"


#define GPT_2msCnt       2uL
#define GPT_5msCnt       5uL
#define GPT_10msCnt      10uL
#define GPT_100msCnt     100uL
#define GPT_1000msCnt    1000uL

volatile boolean Gpt_1msFlag;
volatile boolean Gpt_2msFlag;
volatile boolean Gpt_5msFlag;
volatile boolean Gpt_10msFlag;
volatile boolean Gpt_100msFlag;
volatile boolean Gpt_1000msFlag;


/* Gpt_1ms notification CONTINUOUS MODE */
void GptNotification_1ms(void)
{
    /* 1ms Interrupt*/
    static uint32 Gpt_2msTick =1 ;
    static uint32 Gpt_5msTick =1 ;
    static uint32 Gpt_10msTick =3 ;
    static uint32 Gpt_100msTick =5 ;
    static uint32 Gpt_1000msTick =7 ;

    
    /* 1ms Counter*/
    Gpt_1msFlag = 1;

    Gpt_2msTick++;
    if (Gpt_2msTick >= GPT_2msCnt)
    {
		Gpt_2msTick = 0;
		Gpt_2msFlag = 1;
    }

    /* 5ms Counter*/
    Gpt_5msTick++;
    if (Gpt_5msTick >= GPT_5msCnt)
    {
    Gpt_5msTick = 0;
    Gpt_5msFlag = 1;
    }

    /* 10ms Counter*/
    Gpt_10msTick++;
    if (Gpt_10msTick >= GPT_10msCnt)
    {
    Gpt_10msTick = 0;
    Gpt_10msFlag = 1;
    }

    /* 100ms Counter*/
    Gpt_100msTick++;
    if (Gpt_100msTick >= GPT_100msCnt)
    {
    Gpt_100msTick = 0;
    Gpt_100msFlag = 1;
    }
    
    /* 1000ms Counter*/
    Gpt_1000msTick++;
    if (Gpt_1000msTick >= GPT_1000msCnt)
    {
        Gpt_1000msTick = 0;
        Gpt_1000msFlag = 1;
    }
}
